Protocol VINA    VDS

version 5.2 Windows Box Only - Dr. B  12/18/12

	-- single ligand docking
*****************************************************
	-- NOTE: could do multiple ligands by having a conf.txt that only specifies the protein receptor (and other params) but leaves out the ligand name.  Then in a script file call VINA multiple times from command line with different ligand in each call. 
>PATH\vina.exe --conf conf.txt --ligand ligand1.pdbqt --out ligand1.out
>PATH\vina.exe --conf conf.txt --ligand ligand2.pdbqt
>PATH\vina.exe --conf conf.txt --ligand ligand3.pdbqt
*****************************************************

NOTE: using a Windows computer if you have MGLtools and VINA and OpenBabel installed. 

Purpose: carry out virtual docking with AutoDock VINA (a revised version of AutoDock)
PROGRAMS NEEDED:
--USE OpenBabel to convert and prepare ligands
--USE Autodock Tools (ADT or MGLTools) to prepare docking and then to analyze final results from VINA. 
--OPTIONAL: USE PyMol to analyze docking poses and Hydrogen Bond interactions

NOTE on terminology: 
	compound = ligand = drug =~ molecule
protein = receptor = target = crystal structure = PDB = Xray structure

For Info on VINA usage see:
http://vina.scripps.edu/manual.html
http://vina.scripps.edu/tutorial.html
http://myweb.brooklyn.liu.edu/lmarsh/vina.ppt

OVERVIEW:

*** PREPARE LIGANDS
*** FIND CENTER OF YOUR BINDING SITE
*** READ RECEPTOR MOLECULE IN ADTools:
	EXTRACT LIGAND:
	REMOVE WATERS: 
	ADD HYDROGENS:
*** EDIT CONFIGURATION FILE  
*** RUN JOB
*** ANALYZE RESULTS



*** PREPARE LIGANDS

HINT: Do NOT use a big ligand file for the first time you use this protocol - it will be too cumbersome and hard to troubleshoot. Use only 1 or 2 ligands

CREATE A NEW DIRECTORY TO WORK IN
On your computer, create a new directory from which you will run this job (Windows ADTools likes to default to the C:/users   So, you will need to reference your folder often or change the default

Get an SDF file of your compound that you want to screen
ORIGINAL LIGAND
	If you want to re-dock the original ligand from the PDB crystal strcuture, you will need to get it from PubChem (dont download the PDB version  it isnt properly configured). 
In the PDB page for your protein, go to:
Ligand Chemical Component
	Click on the Identifier for the ligand (e.g. PSY) 
	this will take you to the Ligand Summary page. 
	Now, follow the PubChem link 
	Download the structure as 2D by clicking on the SDFicon in the top right. Chose to save as a 2D SDF. 
	Keep the name given. 
	NOTE: this ligand is not minimized or 3Ded. We'll do this in following steps. 


NOVEL LIGANDS
	Hit2Lead.com website (Chembridge) 
	For 'Screening Compounds' -> Go to 'Search Catalog' 
	Choose 'Search by ID'
	Type in compound IDs into and then download a 2D SDF file
	-- these will have to be converted to 3D in the next steps
	'Save search results as SDF'  
	
Back in your folder, change extension on file from .SDF --> .sdf    (lowercase)
Open your compound file (.sdf) in WORDPAD. IF, the compound ID is not on the top line, type it in. Save the file.


CONVERT LIGANDS TO 3D and GENERATE ALTERNATE STATES
In OpenBabel - convert it to 3D and into a .pdb file
	Did you remember to rename the extension to '.sdf' ?
Open OpenBabel and Use graphical window 
On the left, 
	Change the 'INPUT FORMAT' to sdf --MDL MOL format
	Input your '.sdf' file on the left side. 
	Type a name for the output file on the right side.
		for example:   compound1234_3d.pdb
'Generate 3D Coordinates' - check this box

NOTE: you need to put the extension (.sdf) on the output file name. OBabel will not add it.
NOTE: do NOT add H's here
NOTE: this only make it 3D but does not 'minimize' the ligand to the lowest energy state.
	OR - maybe it does do this since it took so long??????????

Verify that the ligand ID is on the top line of each ligand in the PDB. If not, manually type in the compound name in the top line. 

VERIFY LIGAND STRUCTURE: open up your input file and output file from this and compare them in ADTools (or PyMol) to see if it worked. Does the ligand look strange? 

NOTE: this does not generate multiple statesof your ligand (e.g. tautomers or isomers)

HOW TO CHANGE THE DEFAULT FOLDER IN AUTODOCK TOOLS:
Click on File >> Preferences >> Set 
Then change the 'Startup Directory' by pasting the path of the directory you want to use. Then hit 'Set'

- TIP: to easily get the PATH of a folder, open folder that you want in a new window. Do a right click on the path window at the top and 'copy as text.'
Then right click to paste it into a new window (e.g. the ADTools window) and hit enter to go there.
	(if right click doesn't work, do 'Ctrl+V')
May have to double click in the box and then hit enter to get it to change the path.

********************************************************
********************************************************

CONVERT LIGANDS TO PROPER FORMAT WITH CHARGES 
	CONVERT FROM .PDB to .PDBQT using ADTools

	NOW after they are in 3D format and properly protonated and minimized, you will need to Convert to a PDBQT for VINA to recognize and dock it. PDBQT format is the AutoDock  (Protein Data Bank, Partial Charge (Q), & Atom Type (T)) format.

NOTE: don't use OpenBabel for the PDBQT generation.

For one ligand:
Open the 3D .pdb file of your compoound in AutoDockTools
Ligand >> Input >> Open >> find ligand filename >> force to .PDB if necessary
OK to popup window
	This will: add gasteiger charges, merge non-polar hydrogens, find aromatic carbons and detect the rotatable bonds and Degrees of Freedom for torsions

	Ligand >> Torsion Tree >> Detect Root
	Ligand >> Choose Torsions >> Done
		The green bonds are rotatable for docking
	Ligand >> Torsion Tree >> Set Number of Torsions >> Dismiss
	Ligand >> Output >> Save as PDBQT
	

*****************
ALTERNATE:
THIS below is not same as the Ligand Step through process:
Edit Atom >> Assign AD4 type
-- will ERROR if not done: "all atoms do not have an autodock element field"
Add charges to the molecule
-- Edit >> Charges >> add Kollman  OR >> compute Gasteiger charges
File >> Save >> Write PDBQT 
-- verify folder location
-- keep defaults (PDB Records to save: ATOM, HETATM, CONECT)
Check SORT NODES  (not sure if this is necessary)
*****************

NOTE: if you open the PDBQT file in PyMol - it MAY look strange. It should open up fine in ADTools though.

Now delete the ligand molecule from ADTools (right click >> delete)
	Make sure your selection level is at 'molecule'
	Select >> Set Selection Level >> Molecule

********************************************************
********************************************************
HOW TO CHANGE THE DEFAULT FOLDER IN AUTODOCK TOOLS:
Click on File >> Preferences >> Modify Defaults
Then change the 'Startup Directory' by pasting the path of the directory you want to use. Then hit 'Set'
- TIP: open folder that you want in a new window. Do a right click on the path and 'copy as text.'
********************************************************
********************************************************

READ RECEPTOR MOLECULE:
File >> Read Molecule >> click on your protein file 

*****************************************
DEFINE CENTER OF DOCKING SITE USING LIGAND
In PyMol (or ADTools), load your PDB of your protein, the click on an atom in the Ligand (the center)
Expand explorer view
Scroll down to find ligand
select it (shows up as yellow)
'L' column will let you select labeling choices 
- label the atoms
Figure out which atom number it is. It is easiest to pick an atom where there is only one present in the ligand (e.g. nitrogen or oxygen - not carbon)
Then open up the PDB file in Wordpad and search for that atom.
Since you are dealing with a ligand - go to the HETATM area of the PDB file. This stands for 'heteroatoms' or different atoms because they are not protein. 
Copy the X, Y, Z coordinates down and use these in the VINA configuration file to define the center of the binding site. 
X =
Y = 
Z = 




For IC83nowats.pdb  the center of the ligand is:
HETATM 4812  C3  OAI A 301      44.728  14.090   2.617  1.00  9.80  
Delete the ligand 
-- may already be selected. (EDIT >> DELETE >> DELETE SELECTED ATOMS)
-- note: labels still persist even when molecule removed 
*****************************************




EXTRACT LIGAND AND REMOVE WATERS:
Remove original ligand from protein receptor PDB file
	(can also do this in PyMol)
Select >> Select From String 
Click on 'Atom Sets' >> Select HETATM
Click ADD
This will select both waters and ligand
-- IF it does not get the waters, finish this step and then come back for the waters in the next step -- 
Make sure 'Show Selection Spheres' is selected
You should see yellow stars on the original LIGAND and on all the WATERS
Click 'Dismiss'
Then to get rid of BOTH ligand and waters:
Edit >> Delete >> Delete Atom Set >> Continue
	

REMOVE WATERS: (if not removed in previous step with ligand)
Edit >> Delete Waters
	If that doesn't work, do this longer way:
	Select >> Select From String 
	Type HOH* in the Residue line
	Type * in the Atom line, then Add, Dismiss
	Edit >> Delete >> Delete Atom Set >> Continue

ADD HYDROGENS:
Edit >> Hydrogens >> OK
Add All Hydrogens, 
YES - noBondOrder (for pdb files)
Renumber atoms to include new hydrogens
-yes 

File >> Save >> Write PDB
Give it a new name - e.g. ProteinIDadt.pdb
Save PDB Records: ATOM, HETATM 
-- Don't need the CONECT (remove this from rhs)
Check 'Sort Nodes'

PREPARE GRID:
Grid >> Macromolecule >> Choose >> select protein receptor (the PDB) >> Ok to popup window  (Note: may have to change 'Files of type:' to PDB files.
Grid will merge the nphs (nonpolar hydrogens)
Ok to save as PDBQT
Give it a new name - e.g. ProteinIDadt.pdbqt

Exit out of AutoDock Tools


EDIT CONFIGURATION FILE FOR VINA (conf.txt)
Edit or create a conf.txt file in the directory from which you will run the job. 

conf.txt
----------------------------------------------------------------
#conf.txt
#see   http://vina.scripps.edu/manual.html#usage
receptor = 1U72.pdbqt  
ligand = ligand.pdbqt

log = log.txt
#out = out.pdbqt #dont' need - will use ligand prefix by default
#Binding mode outputs will be similar to name of ligand - can #put this into one file. This is not used if it is already #specified on command line of the script  

#get the center coordinates from the PDB or SDF text file for atom in the original ligand  
center_x = 28.752  
center_y = 13.214
center_z = -0.673

#Size of search box
#avoid search spaces bigger than 30 x 30 x 30 Angstrom
#Units in Angstroms for VINA instead of grid points(adt)
size_x = 25   
size_y = 25   
size_z = 25
#Note: can verify docking box by going to GRID >> GRID BOX

num_modes = 8  #default is 9
exhaustiveness = 8  # default is 8
----------------------------------------------------------------


FIND THE PATH TO VINA ON WINDOWS
C:\Program Files (x86)\The Scripps Research Institute\Vina\
......
Open up this folder in a window (this will allow you to copy and paste the path later)

IF NOT THERE - down load and install to local directory?? (but it is an .msi file)??



USE COMMAND LINE TO RUN VINA
First, you will need to open the folder that you are working with in the command line terminal session 
Open command prompt 
	Start menu
	In the 'Search Programs and Files' box, type:  'cmd'
	Get into current working folder
Determine the PATHtoYOURFOLDER from the graphical folder window where your files are, 
Right click on the path window at the top 
Copy and paste this path into the Command Prompt
Type a 'cd' before the path. e.g.:

For Example:
C:\Users\vdsclass>cd PATHtoYOURFOLDER
C:\Users\vdsclass>cd C:\Users\vdsclass\Documents\validationdock

Then, Type 'dir' to see your files (are you in the right place?)

RUN VINA
To dock, type the command in this format :
>PathToVinaProgram\vina.exe --config conf.txt


Find the PathToVinaProgram by opening a graphical folder window and copying the path at the top. 
NOTE: MUST put PathToVinaProgram in quotes:  "PathToVinaProgram"
For Example:
>"C:\Program Files (x86)\The Scripps Research Institute\Vina\vina.exe" --config conf.txt

TIP: for help with VINA options - just type this at command line:
>vina.exe --help
or
>vina.exe --help_advanced

EVALUATE RESULTS:    

VINA will create an output file starting with thename of the ligand file that you input (e.g. lignad1.pdbqt) in your folder.
	You can open this in Wordpad to view the docking score

To visualize the docked pose, you will need to open the file in ADTools
Load your protein receptor first (the .pdbqt one without water or ligand)
Then Analyze >> Macromolecule >> Choose  (then select your protein that you just loaded)
ADTools >> Analyze >> Dockings >> Open AutoDock Vina Result
  NOTE: don't use 'AutoDock Virtual Screening Result ligand'
	Choose 'Single molecule with multiple conformations'
	Use keyboard arrows to cycle between docked poses
	The score will be displyed next to the pose (e.g. -7.7)
--You may have to rotate the structure to see it
--You can also change how your ligand appears to make it stand out better by selecting and deselecting the red circles in the Dashboard Widget on the left. 

Supposedly:
If score is -10 or less, binding is very tight
If score is -6 to -7 binding is just random, not tight
In between is hard to judge


HYDROGEN BONDS
To display the potential hydrogen bond interactions helping to hold the ligand in place, you will need to build them first.

NOTE: it helps to hide all of the protein first by clicking on the Red circles in the DashBoard widget. Then go back and only show the ligand by clicking on its red circles
	To Add Hbonds:
	Hydrogen Bonds >> Build >> Set Parms and Build >> OK
	Hydrogen Bonds >> Display >> As Spheres
	Hydrogen Bonds >> Display >> As Lines
	- This way will let you 'Show Distances' and 'Show Energy'
	- You can individually select which bonds to show by clicking on them. Scroll to the bottom to pick the ones associated with the ligand. 

Now, use arrow keys to change to the next ligand pose. You will have to rebuild the Hbonds for each pose (actually ADTools may not allow you to Build and Display H-bonds any pose after the 1st Pose. 
Alternatively, you can open it in PyMol - then you can see all of them by doing 'A' tab Find >> Polar Contacts >> To any atoms (but can't display valences -i.e. double bonds - when using PDBQT files in PyMol)



NOTE: if you only want to keep the top solution, you can open the output file in Wordpad and delete all but the first solution. 



FROM PPT (myweb.brooklyn.liu.edu/lmarsh/vina.ppt
The easiest way is to splice the best ligand model onto the receptor with its ligand removed
Open the outfilename.txt (whatever you called it in config.txt)  the Vina output
Copy from the beginning of model 1 to model 2 [note the residue number of the ligand]
Paste into a copy of the receptor pdb file with the old ligand removed
Now you can open your new file with receptor and docked ligand using PyMol to visualize it
Use the residue number of the ligand to select it (e.g. select 480)
Convert to spacefill (e.g. spacefill)
How does it look? Is it in a binding pocked?




